#include <stdio.h>
#include <string.h>
int main()
{
    int n;
    char a[81], b[81];
    scanf("%d", &n);
    int i, maxlen = 0;
    for(i = 1; i <= n; i++)
    {
        gets(a);
        if(strlen(a) > maxlen)
        {
            maxlen = strlen(a);
            strcpy(b, a);
        }
    }
    printf("The longest is: %s", b);
    return 0;
}